var log4js = require('log4js');

// logger configure
log4js.configure({
    appenders: [{
        type: 'console'
            //category: 'console'   //console端显示,则注掉
    }, {
        type: 'dateFile',
        filename: 'logs/ec.log',
        pattern: "_yyyy-MM-dd",
        maxLogSize: 1024 * 1024,
        alwaysIncludePattern: true,
        backups: 4,
        category: 'logger'
    }],
    replaceConsole: true,
    levels: {
        dateFileLog: 'INFO'
    }
});
module.exports = log4js.getLogger('logger');